extends "res://scenes/ui/wood_button/wood_button.gd"

@export var level : int = 1

func _ready() -> void:
	var icon = load("res://assets/sprites/ui/icons/levels/"  + str(level) + ".png")
	texture_normal = AtlasTexture.new()
	texture_normal.atlas = icon
	texture_normal.region = Rect2i(0, 0, 32, 32)
	
	texture_pressed = AtlasTexture.new()
	texture_pressed.atlas = icon
	texture_pressed.region = Rect2i(0, 32, 32, 32)
	
	texture_hover = texture_pressed

func _on_pressed() -> void:
	TransitionManager.change_scene_to_file("res://scenes/levels/level" + str(level) + ".tscn")
